package com.bikes.mileagetracker.entity;

import com.bikes.mileagetracker.orm.Column;
import com.bikes.mileagetracker.orm.DbType;
import com.bikes.mileagetracker.orm.Entity;
import com.bikes.mileagetracker.orm.Table;

@Table("T_USER")
public class UserEntity implements Entity<String> {

    @Column(value="id", type= DbType.TEXT)
    private String id;

    @Column(value="username", type= DbType.TEXT)
    private String username;

    @Column(value="updateTm", type= DbType.INTEGER)
    private long updateTm= System.currentTimeMillis();

    @Column(value="status", type= DbType.INTEGER)
    private int status=0;

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public long getUpdateTm() {
        return updateTm;
    }

    public void setUpdateTm(long updateTm) {
        this.updateTm = updateTm;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return username;
    }
}
